var app = new Vue({
    el: '#app',
    data: {
        form: {
            title: '',
            subtitle: '',
            date: '',
            time: '08:00',
            number: '',
            id: '',
            data: {
                one: '',
                two: '',
                three: '',
                four: '',
                five: '',
                six: '',
                seven: '',
                type: 'left',
                id: ''
            },
            leftData: [],
            rightData: [],
        },
        table: {
            list: []
        },
        pageInfo: {
            title: '栏目'
        },
        dialog: {
            timeIsShow: false,
            dateIsShow: false,
            isShow: false,
            dataIsShow: false,
            title: '',
            disabled: false
        },
        ssqDetail: {
            id: ''
        },
        activeName: 'first',
        activeNameTwo: 'left'
    },
    mounted:function(){
        this.ssqDetail.id = this.form.id = this.getUrlKey('uuid');
        this.getCate()
    },
    methods: {
        goBack: function() {
            window.location.href = '/';
        },
        getCate: function() {
            var _this = this;
            // 获取栏目
            $.ajax({
                url: '/ssq/getShareInfo',
                type: 'get',
                data: {uuid: this.form.id},
                dataType: 'json',
                success: function(res) {
                    if (res.status === 0) {
                        _this.ssqDetail = res.data
                        _this.form.title = res.data.title
                        _this.form.subtitle = res.data.subtitle
                        _this.form.leftData = res.data.leftData
                        _this.form.rightData = res.data.rightData
                    } else {
                        window.location.href = '/404'
                    }
                }
            })
        },

    }
});
$(document).keyup(function(e){
    var key = e.which;
    if(key==13){
        app.getCommunityList();
        return false;
    }
});
